{include file = $smarty.const.APPLICATION_PATH|cat:"/application/views/header.html"}
<!--header stop-->
{include file = $smarty.const.APPLICATION_PATH|cat:"/application/views/common/headerusertitle.html"}
<!--header end-->
{literal}
<style>
    .spanmark{
        float: left;
        left: 63px;
        position: absolute;
        top: 14px;
        color: orange;
        z-index: 9999999;
    }
</style>
<script>
    $(function(){
        $(".upsupply").click(function(){

            var url  = "/user/supplyupdate/";
            var id   = $(this).attr("vid");
            var price= $("input[name=price]").val();
            var num= $("input[name=num]").val();

            $.ajax({
                url:url,
                data:{id:id,price:price,num:num},
                type:'POST',
                success:function(data){
                    var data = eval("("+data+")");
                    var code = data.code;
                    var msg = data.msg;
                    if(code == 8){
                        alert(msg);
                        return true;
                        window.location.reload();
                    }else{
                        alert(msg);
                        return false;
                    }
                },
                dataType:'text'
            });

        });
    })

</script>
{/literal}

<!--content stop-->
<section class="box-user">

    <div class="my_tmt">{$supplydata.cate_name} {$supplydata.product_name}  {$supplydata.brand_name} <span class="fr gray">{$supplydata.update_time}</span></div>

    <div class="my_tms">
        <p class="pt10p">发布公司：{$supplydata.business_name} </p>
        <p class="pt10p">状　　态：<span class="orange">{$_suppliyStateMean[$supplydata.status]} </span></p>
        <p class="pt10p">交易类型：{$_ServiceStateMean[$supplydata.service_id]} </p>
        <p class="pt10p">货币类型：{$_currencyNoMean[$supplydata.currency_id]} </p>
        {if  $supplydata.currency_id neq $_currencyNoCfg['人民币']}
        <p class="pt10p">结算方式：{$supplydata.settlement} </p>
        {/if}
        <p class="pt10p">交货地点：{$supplydata.delivery_area}  </p>
        <p class="pt10p">交货时间：{$supplydata.delivery_time} </p>
        <p class="pt10p" style="position: relative;">单　　价：<input type="text" name="price" value="{$supplydata.price}" class="my_tms_input"/>元/吨 <span class="spanmark">{$_currencyMark[$supplydata.currency_id]}</span></p>
        <p class="pt10p">数　　量：<input type="text" name="num" value="{$supplydata.num}" class="my_tms_input"/>吨</p>
    </div>


    <p class="my_tms_btn">
        {if $supplydata.status eq $_suppliyStateCfg['up'] || $supplydata.status eq $_suppliyStateCfg['cancel'] || $supplydata.status eq $_suppliyStateCfg['down']}
        <a class="upsupply" href="javascript:void(0)" vid="{$supplydata.id}">更新</a>
        {/if}
        {if $supplydata.status eq $_suppliyStateCfg['down']}
        <a href="/user/supplyup/id/{$supplydata.id}">上架</a>
        {/if}
        {if $supplydata.status eq $_suppliyStateCfg['up']}
        <a href="/user/supplydown/id/{$supplydata.id}"  style="background: #999;">下架</a>
        {/if}
        {if $supplydata.status eq $_suppliyStateCfg['audit']}
        <a href="/user/supplycancel/id/{$supplydata.id}" style="background: #999;">取消</a>
        {/if}

        {if $supplydata.status eq $_suppliyStateCfg['cancel']}
        <a href="/user/supplydel/id/{$supplydata.id}" style="background: #999;">删除</a>
        {/if}



    </p>



</section>



{include file = $smarty.const.APPLICATION_PATH|cat:"/application/views/footer.html"}
